import java.io.BufferedReader;
import java.io.FileReader;
import java.util.HashMap;


public class DVAlgorithm {

	private static BufferedReader in = null;
	private static String filename;
	private static HashMap<Point, Integer> GRIPTable;
	
	public DVAlgorithm(String filename){
		this.filename = filename;
		boolean success = openFile();
		
		if (!success)
			PSPUtil.print("Link Length table file " + filename + " could not be read", true);
		GRIPTable = new HashMap<Point, Integer>();
	}
	
	public int getLinkLengths(){
		int counter = 0;
		return 0;
		
	}
	
	// Function used to open Link Length File and store it
	private boolean openFile(){
		try{
			in = new BufferedReader(new FileReader(filename));
			String str;
			while ((str = in.readLine()) != null){
				String[] strSplit = str.split(" ");
				
				// If the string parsed correctly, then process and update the ArrayList
				if (strSplit.length == 5){
					
				}
			}
		}
		catch (Exception e){
			e.printStackTrace();
		}
		
		return false;
		
	}
}
